//
//  MacroDefine.h
//  HzGlyph
//
//  Created by 李 雷川 on 14-7-16.
//  Copyright (c) 2014年 Founder. All rights reserved.
//
#import "Contact.h"

//Contact *globalContact = nil;
#ifndef HzGlyph_MacroDefine_h
#define HzGlyph_MacroDefine_h

#define k_NewMessage @"NewMessage"
#define k_Contact @"API_ADDRESS_LIST"
#define k_Notice  @"notice"
#define k_LatestNotice  @"latestNotice"

#define NetworkError(msg) (UIAlertView *alert =[UIAlertView alloc]initWithTitle:@"连接服务器失败" message:msg delegate:nil cancelButtonTitle:nil otherButtonTitles:@"确定", nil])

#define DOCUMENT_FOLDER [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) objectAtIndex:0]

#define LIBRARY_FOLDER [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES) objectAtIndex:0]

#define APP_FOLDER [NSSearchPathForDirectoriesInDomains(NSApplicationDirectory,NSUserDomainMask, YES) objectAtIndex:0]


#define LATEST_NOTICES_FILE  [NSString stringWithFormat:@"%@%@", [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0],@"/notices.plist"]

#define UPDATETIME_FILE  [NSString stringWithFormat:@"%@%@", [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0],@"/UpdateTime.plist"]

#define LASTCONTACT_FILE  [NSString stringWithFormat:@"%@%@", [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0],@"/LastContact.plist"]


#define IMAGE_FORDER  [NSString stringWithFormat:@"%@%@", [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0],@"/Image"]


#define OUTDIR DOCUMENT_FOLDER
#define CACHEDIR [LIBRARY_FOLDER stringByAppendingPathComponent:@"snapshot"]

#define FMDBQuickCheck(SomeBool) { if (!(SomeBool)) { NSLog(@"Failure on line %d", __LINE__); abort(); } }

#define RongYun_AppKey @"sfci50a7cucqi"
#define RongYun_AppSecret @"cERs90UorSr"

#define Contact_TABLE @"Contact"
#define Comment_TABLE @"Comment"
#define Activity_TABLE @"Actitity"
#define Company_TABLE @"Company"
#define Department_TABLE @"Department"
#define Notice_TABLE @"Notice"
#define Category_TABLE @"Category"
#define JOIN_ACTITITY_TABLE @"JoinActivity"

#define CompanyID  @"10001"

#define BASE_URL @"Contacts"
#ifndef __OPTIMIZE__

#define NSLog(...) NSLog(__VA_ARGS__)

#else

#define NSLog(...) {}

#endif


#endif
